<!-- 收藏列表 -->
<template>
	<view class="page_box">
		<view class="head">
			<xw-empty :isShow="emptyShow" text="暂无数据" textColor="#777777"></xw-empty>
			<block v-for="(item, index) in data" :key="index">
				<view class="list">
					<image class="" :src="item.avatar" mode=""></image>
					<text>{{ item.agent_level == 1 ? '免费会员' : item.agent_level == 2 ? '代理' : item.agent_level == 3 ? '总代理' : '' }}</text>
					<text>{{ item.nickname }}</text>
				</view>
			</block>
		</view>
		<!-- 自定义底部导航 -->
		<shopro-tabbar></shopro-tabbar>
		<!-- 关注弹窗 -->
		<shopro-float-btn></shopro-float-btn>
		<!-- 连续弹窗提醒 -->
		<shopro-notice-modal></shopro-notice-modal>
		<!-- 登录提示 -->
		<shopro-login-modal></shopro-login-modal>
	</view>
</template>

<script>
import xwEmpty from '@/components/xw-empty/xw-empty';
export default {
	components: { xwEmpty },
	data() {
		return {
			cardNo: '',
			idNumber: '',
			userName: '',
			mobilePhnNum: '',
			data: [],
			emptyShow: false,
		};
	},

	computed: {},
	onShow() {},
	onLoad() {
		this.getRichText();
	},
	onHide() {},
	methods: {
		// directPush
		getRichText() {
			this.$api('directPush', {
				page: 1,
			}).then(res => {
				console.log('res :>> ', res);
				if (res.code) {
					this.data = res.data.data;
				} else {
					this.emptyShow = true;
				}
			});
		},
	},
};
</script>

<style lang="scss">
.head {
	.list {
		width: 690rpx;
		height: 100rpx;
		background: #ffffff;
		border-radius: 10rpx;
		margin: 0 auto;
		margin-top: 10rpx;
		display: flex;
		justify-content: space-around;
		align-items: center;
		image {
			width: 80rpx;
			height: 80rpx;
			border-radius: 50%;
		}
		text {
			font-size: 30rpx;
			font-family: PingFang SC;
			font-weight: 500;
			color: #333333;
		}
	}
}
</style>
